package com.imooc;

import com.imooc.controller.WelcomeController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotatedBeanDefinitionReader;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 *  <H1>BeanPostProcessor</H1>
 *
 *  {@link BeanDefinitionRegistryPostProcessor}  ①<br/>
 *  {@link BeanFactoryPostProcessor}  ②<br/>
 *  {@link BeanPostProcessor}  ③<br/>
 *  <hr/>
 * @author : dzj
 * @create: 2021-10-16 19:36
 */
@Slf4j
@Configuration
@ComponentScan("com.imooc")
public class Debug0701_postprocessor {

	public static void main(String[] args) {

		ApplicationContext ctx = new AnnotationConfigApplicationContext(Debug0701_postprocessor.class);
		WelcomeController welcomeController = ctx.getBean(WelcomeController.class);
		welcomeController.handleRequest();
	}
}
